<%-- 
    Document   : ListCars
    Created on : Nov 1, 2011, 11:49:15 PM
    Author     : MrKoi
--%>

<%@page import="DAL.CarBean"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ page session="true" import="java.util.Collection" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="f" %>
<%@ taglib uri="/WEB-INF/taglib139.tld" prefix="pg" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>East2West Tours and Travels</title>
        <style type="text/css">
             #khun
            {
                 width:490px;
                 padding:1px 1px 1px 1px;
                 margin-left:auto;
                 margin-right:auto;
                 margin-top:0px;
            }
            #vien
            {
                 width:157px;                 
                 border:3px solid white;
                 float:left;
                 padding:0px 0px 0px 0px;                   
            }
            .ul
            {
                list-style-type:none;
                margin:0;
                padding:0;                  
            }
            .li
            {
                display:block;
                display:inline;
                float:left;
            }
            .a
            {
            display:block;
            width:60px;
            text-decoration: none; 
            color:#0707e7;
            }
            .font
            {
            font-family:"Times New Roman", Times, serif;
            font-size:x-large;
            font-weight:bold;
            width:200px;
            margin-left:auto;
            margin-right:auto;
            color:#0707e7;
            }
            
            img{border:2px;}
        ul#ulzoon{
                margin:0;
                padding:0;
                padding-top: 5px;                
        }
        li#lizoon{
                margin:0;
                padding:0;
                list-style:none;
                float:left;
                display:inline;
                margin-right:5px;
        }
        #preview{
                position:absolute;
                border:1px solid #ccc;
                background:#333;
                
                display:none;
                color:#fff;
                }
                #paging{
                    
                    clear: both;
                    font-size: 12px;
                    padding-top: 10px;
                    padding-left: 200px;
                }
        </style>
    </head>
    <body>
    <%
        CarBean cb=new CarBean();
        Collection coll=cb.SelectCar();
        request.setAttribute("carb",coll);
        %>
        <center>
                <span style="font-size: 20px;color: #343434;">List Cars</span></center>  
    <div id="khun">               
        <pg:paging pageSize="6" url="index.jsp?page=ListCars"  >
        <c:forEach items="${carb}" var="cr">
            <pg:item>
        <div id="vien">
            <table border="0" style="background-color:#f7f6f6;">
                <tr>
                    <td colspan="2">
                        <ul id="ulzoon">  
                            <li id="lizoon"><a href="${cr.image}" class="preview"><img src="${cr.image}" width="140px" height="140px" style="padding-left: 5px;"/></a></li>
                        </ul>
                     </td>
                </tr>  
                <tr>
                  <td colspan="2">Name car: ${cr.carName}</td>
                </tr>
                <tr>
                  <td colspan="2">Seats: ${cr.seating}</td>
                </tr>  
                 <tr>
                     <td colspan="2">Quantity: ${cr.quantity}</td>
                </tr>
                <tr>
                    <td colspan="2" align="center">
                        <ul class="ul">
                            <li class="li"><a class="a" href="index.jsp?page=DetailCar&id=${cr.carID}">Detail</a></li>
                            <li class="li">|</li>
                            <li class="li"><a class="a" href="index.jsp?page=CarBook&id=${cr.carID}">Rental</a></li>
                        </ul>
                    </td>
                </tr>
            </table>
        </div>
     </pg:item>       
    </c:forEach>        
        <div id="paging">
        <pg:index>
          <pg:page><%=thisPage%></pg:page>
        </pg:index>    
            </div></pg:paging>
        
    </div> 
        <script type="text/javascript" src="js/main.js"></script>
    </body>
</html>

